Optimal. Leaf size=166 \[ \frac {b \left (B \log \left (e \left (\frac {a+b x}{c+d x}\right )^n\right )+A\right )^2}{2 B g i^2 n (b c-a d)^2}-\frac {A d (a+b x)}{g i^2 (c+d x) (b c-a d)^2}-\frac {B d (a+b x) \log \left (e \left (\frac {a+b x}{c+d x}\right )^n\right )}{g i^2 (c+d x) (b c-a d)^2}+\frac {B d n (a+b x)}{g i^2 (c+d x) (b c-a d)^2} \]
[Out]
________________________________________________________________________________________
Rubi [C] time = 0.68, antiderivative size = 450, normalized size of antiderivative = 2.71, number of steps used = 22, number of rules used = 11, integrand size = 43, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.256, Rules used = {2528, 2524, 2418, 2390, 2301, 2394, 2393, 2391, 2525, 12, 44} \[ \frac {b B n \text {PolyLog}\left (2,-\frac {d (a+b x)}{b c-a d}\right )}{g i^2 (b c-a d)^2}+\frac {b B n \text {PolyLog}\left (2,\frac {b (c+d x)}{b c-a d}\right )}{g i^2 (b c-a d)^2}+\frac {b \log (a+b x) \left (B \log \left (e \left (\frac {a+b x}{c+d x}\right )^n\right )+A\right )}{g i^2 (b c-a d)^2}+\frac {B \log \left (e \left (\frac {a+b x}{c+d x}\right )^n\right )+A}{g i^2 (c+d x) (b c-a d)}-\frac {b \log (c+d x) \left (B \log \left (e \left (\frac {a+b x}{c+d x}\right )^n\right )+A\right )}{g i^2 (b c-a d)^2}-\frac {B n}{g i^2 (c+d x) (b c-a d)}-\frac {b B n \log ^2(a+b x)}{2 g i^2 (b c-a d)^2}-\frac {b B n \log ^2(c+d x)}{2 g i^2 (b c-a d)^2}-\frac {b B n \log (a+b x)}{g i^2 (b c-a d)^2}+\frac {b B n \log (a+b x) \log \left (\frac {b (c+d x)}{b c-a d}\right )}{g i^2 (b c-a d)^2}+\frac {b B n \log (c+d x)}{g i^2 (b c-a d)^2}+\frac {b B n \log (c+d x) \log \left (-\frac {d (a+b x)}{b c-a d}\right )}{g i^2 (b c-a d)^2} \]
Antiderivative was successfully verified.
[In]
[Out]
Rule 12
Rule 44
Rule 2301
Rule 2390
Rule 2391
Rule 2393
Rule 2394
Rule 2418
Rule 2524
Rule 2525
Rule 2528
Rubi steps
\begin {align*} \int \frac {A+B \log \left (e \left (\frac {a+b x}{c+d x}\right )^n\right )}{(147 c+147 d x)^2 (a g+b g x)} \, dx &=\int \left (\frac {b^2 \left (A+B \log \left (e \left (\frac {a+b x}{c+d x}\right )^n\right )\right )}{21609 (b c-a d)^2 g (a+b x)}-\frac {d \left (A+B \log \left (e \left (\frac {a+b x}{c+d x}\right )^n\right )\right )}{21609 (b c-a d) g (c+d x)^2}-\frac {b d \left (A+B \log \left (e \left (\frac {a+b x}{c+d x}\right )^n\right )\right )}{21609 (b c-a d)^2 g (c+d x)}\right ) \, dx\\ &=\frac {b^2 \int \frac {A+B \log \left (e \left (\frac {a+b x}{c+d x}\right )^n\right )}{a+b x} \, dx}{21609 (b c-a d)^2 g}-\frac {(b d) \int \frac {A+B \log \left (e \left (\frac {a+b x}{c+d x}\right )^n\right )}{c+d x} \, dx}{21609 (b c-a d)^2 g}-\frac {d \int \frac {A+B \log \left (e \left (\frac {a+b x}{c+d x}\right )^n\right )}{(c+d x)^2} \, dx}{21609 (b c-a d) g}\\ &=\frac {A+B \log \left (e \left (\frac {a+b x}{c+d x}\right )^n\right )}{21609 (b c-a d) g (c+d x)}+\frac {b \log (a+b x) \left (A+B \log \left (e \left (\frac {a+b x}{c+d x}\right )^n\right )\right )}{21609 (b c-a d)^2 g}-\frac {b \left (A+B \log \left (e \left (\frac {a+b x}{c+d x}\right )^n\right )\right ) \log (c+d x)}{21609 (b c-a d)^2 g}-\frac {(b B n) \int \frac {(c+d x) \left (-\frac {d (a+b x)}{(c+d x)^2}+\frac {b}{c+d x}\right ) \log (a+b x)}{a+b x} \, dx}{21609 (b c-a d)^2 g}+\frac {(b B n) \int \frac {(c+d x) \left (-\frac {d (a+b x)}{(c+d x)^2}+\frac {b}{c+d x}\right ) \log (c+d x)}{a+b x} \, dx}{21609 (b c-a d)^2 g}-\frac {(B n) \int \frac {b c-a d}{(a+b x) (c+d x)^2} \, dx}{21609 (b c-a d) g}\\ &=\frac {A+B \log \left (e \left (\frac {a+b x}{c+d x}\right )^n\right )}{21609 (b c-a d) g (c+d x)}+\frac {b \log (a+b x) \left (A+B \log \left (e \left (\frac {a+b x}{c+d x}\right )^n\right )\right )}{21609 (b c-a d)^2 g}-\frac {b \left (A+B \log \left (e \left (\frac {a+b x}{c+d x}\right )^n\right )\right ) \log (c+d x)}{21609 (b c-a d)^2 g}-\frac {(B n) \int \frac {1}{(a+b x) (c+d x)^2} \, dx}{21609 g}-\frac {(b B n) \int \left (\frac {b \log (a+b x)}{a+b x}-\frac {d \log (a+b x)}{c+d x}\right ) \, dx}{21609 (b c-a d)^2 g}+\frac {(b B n) \int \left (\frac {b \log (c+d x)}{a+b x}-\frac {d \log (c+d x)}{c+d x}\right ) \, dx}{21609 (b c-a d)^2 g}\\ &=\frac {A+B \log \left (e \left (\frac {a+b x}{c+d x}\right )^n\right )}{21609 (b c-a d) g (c+d x)}+\frac {b \log (a+b x) \left (A+B \log \left (e \left (\frac {a+b x}{c+d x}\right )^n\right )\right )}{21609 (b c-a d)^2 g}-\frac {b \left (A+B \log \left (e \left (\frac {a+b x}{c+d x}\right )^n\right )\right ) \log (c+d x)}{21609 (b c-a d)^2 g}-\frac {(B n) \int \left (\frac {b^2}{(b c-a d)^2 (a+b x)}-\frac {d}{(b c-a d) (c+d x)^2}-\frac {b d}{(b c-a d)^2 (c+d x)}\right ) \, dx}{21609 g}-\frac {\left (b^2 B n\right ) \int \frac {\log (a+b x)}{a+b x} \, dx}{21609 (b c-a d)^2 g}+\frac {\left (b^2 B n\right ) \int \frac {\log (c+d x)}{a+b x} \, dx}{21609 (b c-a d)^2 g}+\frac {(b B d n) \int \frac {\log (a+b x)}{c+d x} \, dx}{21609 (b c-a d)^2 g}-\frac {(b B d n) \int \frac {\log (c+d x)}{c+d x} \, dx}{21609 (b c-a d)^2 g}\\ &=-\frac {B n}{21609 (b c-a d) g (c+d x)}-\frac {b B n \log (a+b x)}{21609 (b c-a d)^2 g}+\frac {A+B \log \left (e \left (\frac {a+b x}{c+d x}\right )^n\right )}{21609 (b c-a d) g (c+d x)}+\frac {b \log (a+b x) \left (A+B \log \left (e \left (\frac {a+b x}{c+d x}\right )^n\right )\right )}{21609 (b c-a d)^2 g}+\frac {b B n \log (c+d x)}{21609 (b c-a d)^2 g}+\frac {b B n \log \left (-\frac {d (a+b x)}{b c-a d}\right ) \log (c+d x)}{21609 (b c-a d)^2 g}-\frac {b \left (A+B \log \left (e \left (\frac {a+b x}{c+d x}\right )^n\right )\right ) \log (c+d x)}{21609 (b c-a d)^2 g}+\frac {b B n \log (a+b x) \log \left (\frac {b (c+d x)}{b c-a d}\right )}{21609 (b c-a d)^2 g}-\frac {(b B n) \operatorname {Subst}\left (\int \frac {\log (x)}{x} \, dx,x,a+b x\right )}{21609 (b c-a d)^2 g}-\frac {(b B n) \operatorname {Subst}\left (\int \frac {\log (x)}{x} \, dx,x,c+d x\right )}{21609 (b c-a d)^2 g}-\frac {\left (b^2 B n\right ) \int \frac {\log \left (\frac {b (c+d x)}{b c-a d}\right )}{a+b x} \, dx}{21609 (b c-a d)^2 g}-\frac {(b B d n) \int \frac {\log \left (\frac {d (a+b x)}{-b c+a d}\right )}{c+d x} \, dx}{21609 (b c-a d)^2 g}\\ &=-\frac {B n}{21609 (b c-a d) g (c+d x)}-\frac {b B n \log (a+b x)}{21609 (b c-a d)^2 g}-\frac {b B n \log ^2(a+b x)}{43218 (b c-a d)^2 g}+\frac {A+B \log \left (e \left (\frac {a+b x}{c+d x}\right )^n\right )}{21609 (b c-a d) g (c+d x)}+\frac {b \log (a+b x) \left (A+B \log \left (e \left (\frac {a+b x}{c+d x}\right )^n\right )\right )}{21609 (b c-a d)^2 g}+\frac {b B n \log (c+d x)}{21609 (b c-a d)^2 g}+\frac {b B n \log \left (-\frac {d (a+b x)}{b c-a d}\right ) \log (c+d x)}{21609 (b c-a d)^2 g}-\frac {b \left (A+B \log \left (e \left (\frac {a+b x}{c+d x}\right )^n\right )\right ) \log (c+d x)}{21609 (b c-a d)^2 g}-\frac {b B n \log ^2(c+d x)}{43218 (b c-a d)^2 g}+\frac {b B n \log (a+b x) \log \left (\frac {b (c+d x)}{b c-a d}\right )}{21609 (b c-a d)^2 g}-\frac {(b B n) \operatorname {Subst}\left (\int \frac {\log \left (1+\frac {d x}{b c-a d}\right )}{x} \, dx,x,a+b x\right )}{21609 (b c-a d)^2 g}-\frac {(b B n) \operatorname {Subst}\left (\int \frac {\log \left (1+\frac {b x}{-b c+a d}\right )}{x} \, dx,x,c+d x\right )}{21609 (b c-a d)^2 g}\\ &=-\frac {B n}{21609 (b c-a d) g (c+d x)}-\frac {b B n \log (a+b x)}{21609 (b c-a d)^2 g}-\frac {b B n \log ^2(a+b x)}{43218 (b c-a d)^2 g}+\frac {A+B \log \left (e \left (\frac {a+b x}{c+d x}\right )^n\right )}{21609 (b c-a d) g (c+d x)}+\frac {b \log (a+b x) \left (A+B \log \left (e \left (\frac {a+b x}{c+d x}\right )^n\right )\right )}{21609 (b c-a d)^2 g}+\frac {b B n \log (c+d x)}{21609 (b c-a d)^2 g}+\frac {b B n \log \left (-\frac {d (a+b x)}{b c-a d}\right ) \log (c+d x)}{21609 (b c-a d)^2 g}-\frac {b \left (A+B \log \left (e \left (\frac {a+b x}{c+d x}\right )^n\right )\right ) \log (c+d x)}{21609 (b c-a d)^2 g}-\frac {b B n \log ^2(c+d x)}{43218 (b c-a d)^2 g}+\frac {b B n \log (a+b x) \log \left (\frac {b (c+d x)}{b c-a d}\right )}{21609 (b c-a d)^2 g}+\frac {b B n \text {Li}_2\left (-\frac {d (a+b x)}{b c-a d}\right )}{21609 (b c-a d)^2 g}+\frac {b B n \text {Li}_2\left (\frac {b (c+d x)}{b c-a d}\right )}{21609 (b c-a d)^2 g}\\ \end {align*}
________________________________________________________________________________________
Mathematica [C] time = 0.35, size = 304, normalized size = 1.83 \[ \frac {2 (b c-a d) \left (B \log \left (e \left (\frac {a+b x}{c+d x}\right )^n\right )+A\right )+2 b (c+d x) \log (a+b x) \left (B \log \left (e \left (\frac {a+b x}{c+d x}\right )^n\right )+A\right )-2 b (c+d x) \log (c+d x) \left (B \log \left (e \left (\frac {a+b x}{c+d x}\right )^n\right )+A\right )-b B n (c+d x) \left (\log (a+b x) \left (\log (a+b x)-2 \log \left (\frac {b (c+d x)}{b c-a d}\right )\right )-2 \text {Li}_2\left (\frac {d (a+b x)}{a d-b c}\right )\right )+b B n (c+d x) \left (2 \text {Li}_2\left (\frac {b (c+d x)}{b c-a d}\right )+\log (c+d x) \left (2 \log \left (\frac {d (a+b x)}{a d-b c}\right )-\log (c+d x)\right )\right )-2 B n (b (c+d x) \log (a+b x)-a d-b (c+d x) \log (c+d x)+b c)}{2 g i^2 (c+d x) (b c-a d)^2} \]
Antiderivative was successfully verified.
[In]
[Out]
________________________________________________________________________________________
fricas [A] time = 0.93, size = 196, normalized size = 1.18 \[ \frac {2 \, A b c - 2 \, A a d + {\left (B b d n x + B b c n\right )} \log \left (\frac {b x + a}{d x + c}\right )^{2} - 2 \, {\left (B b c - B a d\right )} n + 2 \, {\left (B b c - B a d + {\left (B b d x + B b c\right )} \log \left (\frac {b x + a}{d x + c}\right )\right )} \log \relax (e) - 2 \, {\left (B a d n - A b c + {\left (B b d n - A b d\right )} x\right )} \log \left (\frac {b x + a}{d x + c}\right )}{2 \, {\left ({\left (b^{2} c^{2} d - 2 \, a b c d^{2} + a^{2} d^{3}\right )} g i^{2} x + {\left (b^{2} c^{3} - 2 \, a b c^{2} d + a^{2} c d^{2}\right )} g i^{2}\right )}} \]
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
giac [A] time = 4.50, size = 180, normalized size = 1.08 \[ -\frac {1}{2} \, {\left (\frac {B b n \log \left (\frac {b x + a}{d x + c}\right )^{2}}{b c g - a d g} - \frac {2 \, {\left (b x + a\right )} B d n \log \left (\frac {b x + a}{d x + c}\right )}{{\left (b c g - a d g\right )} {\left (d x + c\right )}} + \frac {2 \, {\left (A b + B b\right )} \log \left (\frac {b x + a}{d x + c}\right )}{b c g - a d g} + \frac {2 \, {\left (B d n - A d - B d\right )} {\left (b x + a\right )}}{{\left (b c g - a d g\right )} {\left (d x + c\right )}}\right )} {\left (\frac {b c}{{\left (b c - a d\right )}^{2}} - \frac {a d}{{\left (b c - a d\right )}^{2}}\right )} \]
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
maple [F] time = 0.47, size = 0, normalized size = 0.00 \[ \int \frac {B \ln \left (e \left (\frac {b x +a}{d x +c}\right )^{n}\right )+A}{\left (b g x +a g \right ) \left (d i x +c i \right )^{2}}\, dx \]
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
maxima [B] time = 1.43, size = 424, normalized size = 2.55 \[ B {\left (\frac {1}{{\left (b c d - a d^{2}\right )} g i^{2} x + {\left (b c^{2} - a c d\right )} g i^{2}} + \frac {b \log \left (b x + a\right )}{{\left (b^{2} c^{2} - 2 \, a b c d + a^{2} d^{2}\right )} g i^{2}} - \frac {b \log \left (d x + c\right )}{{\left (b^{2} c^{2} - 2 \, a b c d + a^{2} d^{2}\right )} g i^{2}}\right )} \log \left (e {\left (\frac {b x}{d x + c} + \frac {a}{d x + c}\right )}^{n}\right ) - \frac {{\left ({\left (b d x + b c\right )} \log \left (b x + a\right )^{2} + {\left (b d x + b c\right )} \log \left (d x + c\right )^{2} + 2 \, b c - 2 \, a d + 2 \, {\left (b d x + b c\right )} \log \left (b x + a\right ) - 2 \, {\left (b d x + b c + {\left (b d x + b c\right )} \log \left (b x + a\right )\right )} \log \left (d x + c\right )\right )} B n}{2 \, {\left (b^{2} c^{3} g i^{2} - 2 \, a b c^{2} d g i^{2} + a^{2} c d^{2} g i^{2} + {\left (b^{2} c^{2} d g i^{2} - 2 \, a b c d^{2} g i^{2} + a^{2} d^{3} g i^{2}\right )} x\right )}} + A {\left (\frac {1}{{\left (b c d - a d^{2}\right )} g i^{2} x + {\left (b c^{2} - a c d\right )} g i^{2}} + \frac {b \log \left (b x + a\right )}{{\left (b^{2} c^{2} - 2 \, a b c d + a^{2} d^{2}\right )} g i^{2}} - \frac {b \log \left (d x + c\right )}{{\left (b^{2} c^{2} - 2 \, a b c d + a^{2} d^{2}\right )} g i^{2}}\right )} \]
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
mupad [B] time = 4.82, size = 241, normalized size = 1.45 \[ \frac {B\,n}{g\,i^2\,\left (a\,d-b\,c\right )\,\left (c+d\,x\right )}-\frac {A}{g\,i^2\,\left (a\,d-b\,c\right )\,\left (c+d\,x\right )}-\frac {B\,\ln \left (e\,{\left (\frac {a+b\,x}{c+d\,x}\right )}^n\right )}{g\,i^2\,\left (a\,d-b\,c\right )\,\left (c+d\,x\right )}+\frac {B\,b\,{\ln \left (e\,{\left (\frac {a+b\,x}{c+d\,x}\right )}^n\right )}^2}{2\,g\,i^2\,n\,{\left (a\,d-b\,c\right )}^2}-\frac {A\,b\,\mathrm {atan}\left (\frac {a\,d\,1{}\mathrm {i}+b\,c\,1{}\mathrm {i}+b\,d\,x\,2{}\mathrm {i}}{a\,d-b\,c}\right )\,2{}\mathrm {i}}{g\,i^2\,{\left (a\,d-b\,c\right )}^2}+\frac {B\,b\,n\,\mathrm {atan}\left (\frac {a\,d\,1{}\mathrm {i}+b\,c\,1{}\mathrm {i}+b\,d\,x\,2{}\mathrm {i}}{a\,d-b\,c}\right )\,2{}\mathrm {i}}{g\,i^2\,{\left (a\,d-b\,c\right )}^2} \]
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
sympy [F(-1)] time = 0.00, size = 0, normalized size = 0.00 \[ \text {Timed out} \]
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________